package schoolsys.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ConfigerManger {
    public static ConfigerManger configerManger = new ConfigerManger();
    Properties properties;
    public ConfigerManger(){
        //读取文件
        properties = new Properties();
        InputStream is = ConfigerManger.class
                .getClassLoader()
                .getResourceAsStream("database.properties");
        try {
            properties.load(is);
            is.close();
        }catch (IOException e){
            e.printStackTrace();
        }

    }
    public static ConfigerManger getConfigerManger(){
        return configerManger;

    }
    public String getString(String key){
        return properties.getProperty(key);
    }

}
